<?
// это копипаст из другого файла, не забыть почистить
//arrPrint($arResult["PREVIEW_PICTURE"]);
 $HEIGHT=92;
 $WIDTH=130;  
 $arResult["PREVIEW_PICTURE"]=$APPLICATION->IncludeComponent("soulstream:imager", "", 
			Array(  "MODE" => "4",
                    "RETURN" => "src",
                    "IMAGE" =>  $arResult["PREVIEW_PICTURE"]["SRC"],
                    "WIDTH" => $WIDTH,
                    "HEIGHT" => $HEIGHT,
                    "ADD_WATERMARK" => "N",
					"ADD_TEXT" =>"N", 
					"ADD_CORNER" => "N",
                    ),false, array("HIDE_ICONS"=>"Y")
                );

$counti=count($arResult["OFFERS"]); 
           
for($i=1;$i<$counti;$i++)
{
  //  echo "i=".$i."<br>";
    for($j=$i;$j<$counti;$j++)
    {
     //  echo $j."<br>";
       if($arResult["OFFERS"][$j]["CATALOG_PRICE_1"]<$arResult["OFFERS"][$j-1]["CATALOG_PRICE_1"]):
        //echo "swap ".$j." - ".($j-1)."<br>";
        $tmpitem=$arResult["OFFERS"][$j-1];
        $arResult["OFFERS"][$j-1]=$arResult["OFFERS"][$j];
        $arResult["OFFERS"][$j]=$tmpitem;
       endif;
    }
 
};
// foreach($arResult["OFFERS"] as $offersEl)
  //      $ALLTAGS=array_merge((array)$ALLTAGS,(array)GetAllTags($offersEl["ID"]));  

//$arResult["TAGS"]=  array_unique(array_merge((array)$ALLTAGS,(array)GetAllTags($arResult["ID"]))); 
//$arResult["TAGS"]=  array_unique((array)GetAllTags($arResult["ID"]));
?>